Skip to content

fix(pkgs/id): port the #598 exit-code fix to the pkgs/id update-nixpkgs-inputs copies + anti-drift guard (#2783) - #3021

Merged
dezren39 merged 1 commit into
mainfrom
queue/4030-2783-nixpkgs-port
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4030-2783-nixpkgs-port

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Fixes #2783. Queue task 4030 (repo-health-code-pilot).

What

The pkgs/id copies of update-nixpkgs-inputs.{py,sh} — the ones the pkgs/id just recipes actually run — never received the #598 silent-failure fix that landed in the root scripts/ copies:

This PR ports the root copies verbatim — the .py diff was exactly the missing tally block and nothing else — so both pairs are now byte-identical. No behaviour change for the root copies; the pkgs/id just recipes and input discovery are untouched.

Anti-drift guard (acceptance 3)

New scripts/tests/test_update_nixpkgs_inputs.py (unittest, stub nix + stub uv):

This also supplies the stub-nix harness #603 asks for, extended to both copies; #603 remains open for wiring script tests into CI.

Verification (laptop)

  • python3 -m unittest discover -s scripts/tests -p 'test_update_nixpkgs_inputs.py' — 6 tests, OK.
  • Negative controls: the pre-fix pkgs/id .py exits 0 under a failing stub nix (the bug); the pre-fix wrapper paired with a genuinely-failing .py executes the update twice (nix stub called 2x) — both shapes are caught by the new tests.
  • cmp confirms both pairs byte-identical after the port.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…gs-inputs copies + anti-drift guard (#2783)

The pkgs/id copies never received #598: failed updates exited 0 and the wrapper re-ran the whole update after a genuine failure. Porting the root scripts/ copies verbatim makes both pairs byte-identical.

Anti-drift guard: scripts/tests/test_update_nixpkgs_inputs.py asserts byte-identity of both pairs and pins the #598 contract for BOTH copies (failing update exits 1, up-to-date exits 0, wrapper runs the body exactly once on genuine failure and falls back to python3 only on 126/127). These tests also supply the stub-nix harness #603 asks for, for both copies. Negative controls: pre-fix pkgs/id .py exits 0 under a failing stub nix; the pre-fix wrapper paired with a genuinely-failing .py executes the update twice.

Verified on the laptop: python3 -m unittest discover -s scripts/tests -p test_update_nixpkgs_inputs.py — 6 tests OK. Root copies untouched; pkgs/id just recipes unchanged.
@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 10:43
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ecd284ad-9798-4779-af8b-a27049e0be16
Commits

Reviewing files that changed from the base of the PR and between fa7e71b and 96c397f.

Files selected for processing: 3
  • pkgs/id/scripts/update-nixpkgs-inputs.py
  • pkgs/id/scripts/update-nixpkgs-inputs.sh
  • scripts/tests/test_update_nixpkgs_inputs.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T10:44:47.923960Z 96c397f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant